FROM ubuntu:latest

RUN apt-get update && apt-get upgrade -y && apt-get install -y build-essential python3 python3-dev python3-pip libssl-dev git
WORKDIR /home/elastalert
ADD  ./*   ./
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  elastalert &&  ln -sf /dev/stdout elastalert.log  && ln -sf /dev/stderr elastalert.log
CMD ["/bin/bash","run.sh"]